#!/bin/bash

LOG_FILENAME="experiments.log"

function start_up_debug
{
	touch $LOG_FILENAME	
}

function debug 
{
	echo $1 >> $LOG_FILENAME 
}

start_up_debug

debug "starting experiment"

debug "case grain 1 threads 1"
java -jar prime.jar 1 1
debug "case grain 100 threads 1"
java -jar prime.jar 100 1
debug "case grain 1000 threads 1"
java -jar prime.jar 1000 1
debug "case grain 10000 threads 1"
java -jar prime.jar 10000 1
debug "case grain 25000 threads 1"
java -jar prime.jar 25000 1
debug "case grain 50000 threads 1"
java -jar prime.jar 50000 1
debug "case grain 100000 threads 1"
java -jar prime.jar 100000 1

debug "case grain 1 threads 2"
java -jar prime.jar 1 2
debug "case grain 100 threads 2"
java -jar prime.jar 100 2
debug "case grain 1000 threads 2"
java -jar prime.jar 1000 2
debug "case grain 10000 threads 2"
java -jar prime.jar 10000 2
debug "case grain 25000 threads 2"
java -jar prime.jar 25000 2
debug "case grain 50000 threads 2"
java -jar prime.jar 50000 2

debug "case grain 1 threads 4"
java -jar prime.jar 1 4
debug "case grain 100 threads 4"
java -jar prime.jar 100 4
debug "case grain 1000 threads 4"
java -jar prime.jar 1000 4
debug "case grain 10000 threads 4"
java -jar prime.jar 10000 4
debug "case grain 25000 threads 4"
java -jar prime.jar 25000 4

debug "case grain 1 threads 8"
java -jar prime.jar 1 8
debug "case grain 100 threads 8"
java -jar prime.jar 100 8
debug "case grain 1000 threads 8"
java -jar prime.jar 1000 8
debug "case grain 10000 threads 8"
java -jar prime.jar 10000 8

# added these cases to the experiment
debug "case grain 1 threads 10"
java -jar prime.jar 1 10
debug "case grain 100 threads 10"
java -jar prime.jar 100 10
debug "case grain 1000 threads 10"
java -jar prime.jar 1000 10
debug "case grain 10000 threads 10"
java -jar prime.jar 10000 10

debug "case grain 1 threads 16"
java -jar prime.jar 1 16
debug "case grain 100 threads 16"
java -jar prime.jar 100 16
debug "case grain 1000 threads 16"
java -jar prime.jar 1000 16
debug "case grain 5000 threads 16"
java -jar prime.jar 5000 16

debug "finishing experiment"
